package edu.mtu.citizenscience.cs.sdk.json;
/**
 * @author Corbin Uselton <corbinu@cwuselto@mtu.edu>
 * @copyright (c) 2012 MichiganTech <http://www.mtu.edu>
 * @since 1.0
 * 
 * Error class for an error returned in the server response. 
 * Loaded from a JSON String via Jackson JSON
 */
public class Error {
	// the HTTP response code of the returned request
	private int responseCode;
	// message to the developer about the error
	private String developerMessage;
	// message to the user about the error
	private String userMessage;
	// the numeric code for the error
	private int errorCode;
	// link to any documentation on the error
	private String info;
	
	/**
	 * Get the error response code
	 * 
	 * @param   void
	 * @return	int - HTTP Response code
	 */
	public int getResponseCode() 
	{
		return responseCode;
	}
	
	/**
	 * Set the error response code
	 * 
	 * @param   responseCode - int - HTTP Response code
	 * @return	void
	 */
	public void setResponseCode(int responseCode) 
	{
		this.responseCode = responseCode;
	}
	
	/**
	 * Get the error developer message
	 * 
	 * @param   void
	 * @return	String - Developer message
	 */
	public String getDeveloperMessage() 
	{
		return developerMessage;
	}
	
	/**
	 * Set the error developer message
	 * 
	 * @param   developerMessage - String - Developer message
	 * @return	void
	 */
	public void setDeveloperMessage(String developerMessage) 
	{
		this.developerMessage = developerMessage;
	}
	
	/**
	 * Get the error user message
	 * 
	 * @param   void
	 * @return	String - User message
	 */
	public String getUserMessage() 
	{
		return userMessage;
	}
	
	/**
	 * Set the error user message
	 * 
	 * @param   userMessage - String - User message
	 * @return	void
	 */
	public void setUserMessage(String userMessage) 
	{
		this.userMessage = userMessage;
	}
	
	/**
	 * Get the error code
	 * 
	 * @param   void
	 * @return	int - Error code
	 */
	public int getErrorCode() 
	{
		return errorCode;
	}
	
	/**
	 * Set the error code
	 * 
	 * @param   errorCode - int - Error code
	 * @return	void
	 */
	public void setErrorCode(int errorCode) 
	{
		this.errorCode = errorCode;
	}
	
	/**
	 * Get the error info link
	 * 
	 * @param   void
	 * @return	String - info link
	 */
	public String getInfo() 
	{
		return info;
	}
	
	/**
	 * Set the error info link
	 * 
	 * @param   info - String - info link
	 * @return	void
	 */
	public void setInfo(String info) 
	{
		this.info = info;
	}
}
